package cn.iocoder.yudao.module.water.dal.mysql.prohis;

import java.util.*;

import cn.iocoder.yudao.framework.common.pojo.PageResult;
import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX;
import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX;
import cn.iocoder.yudao.module.water.dal.dataobject.prohis.ProHisDO;
import org.apache.ibatis.annotations.Mapper;
import cn.iocoder.yudao.module.water.controller.admin.prohis.vo.*;

/**
 * 生产历史 Mapper
 *
 * @author 左达成
 */
@Mapper
public interface ProHisMapper extends BaseMapperX<ProHisDO> {

    default PageResult<ProHisDO> selectPage(ProHisPageReqVO reqVO) {
        return selectPage(reqVO, new LambdaQueryWrapperX<ProHisDO>()
                .betweenIfPresent(ProHisDO::getDate, reqVO.getDate())
                .orderByDesc(ProHisDO::getId));
    }

    default List<ProHisDO> selectList(ProHisExportReqVO reqVO) {
        return selectList(new LambdaQueryWrapperX<ProHisDO>()
                .betweenIfPresent(ProHisDO::getDate, reqVO.getDate())
                .orderByDesc(ProHisDO::getId));
    }

}
